package com.yc.Di.bean2_autowired;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.inject.Inject;
import javax.inject.Named;

/**
 * @author zwei
 * @create 2024-07-29 11:08
 */
@Service
public class OrderBizImpl implements OrderBiz{
//    @Autowired      //自动装配  按照类型装配
    @Inject
    @Named("orderMysqlDao")
    private OrderDao dao;       //dao层的beanid
    private void setDao(OrderDao dao){
        this.dao=dao;
    }
    @Override
    public void markeOrder() {
        System.out.println("业务层orderbizimpl的makeorder");
        this.dao.addOrder();
    }
}
